package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import pojo.User;
import service.UserService;

@Controller
@RequestMapping("/user")
public class UserController {
    private UserService userService;
    @RequestMapping("/index")
    public String index(){
        return "index";
    }
@RequestMapping("/login")
    public String login(User user){
        //登录逻辑
    boolean flag = userService.login(user);
    if (flag){
        return "user/list";
    }else {
        return "login";
    }

}



//
//全查询
@RequestMapping("/list/{currentPage}")
    public String list(User user ,@PathVariable("currentPage") int currentPage){
    //查询逻辑



    return "list";
}




}

